{extend name="public/base"/}
{block name="style"}
	<link rel="stylesheet" href="/public/novelv2/css/webpagecss/reset.css">
    <link rel="stylesheet" href="/public/novelv2/pluginIn/Swiper4/css/swiper.min.css">
    <link rel="stylesheet" href="/public/novelv2/css/webpagecss/common.css">
    <link rel="stylesheet" href="/public/novelv2/css/webpagecss/addition.css">
    <link rel="stylesheet" href="/public/novelv2/css/webpagecss/pager.css">
	<script src="/public/novelv2/js/templete/index.js"></script>

	<script src="/public/novelv2/pluginIn/webMain.js"></script>
	<script src="/public/novelv2/pluginIn/Swiper4/js/swiper.min.js"></script>
	<script>

		var swiper = new Swiper('.swiper-container', {
			loop: true,
			autoplay: {
				delay: 3000,
				disableOnInteraction: false,
			},
			pagination: {
				el: '.swiper-pagination',
				clickable: true,
			}
		});


		$('.head-login').click(function () {
			$('.no-login-ways').show()
		})
		$('.no-login-ways .close').click(function () {
			$('.no-login-ways').hide()
		})

		function loginRegist(obj) {
			obj.find('.loregbtn span').each(function (index, item) {
				$(this).click(function () {
					obj.find('.loregbtn span').removeClass('onclick').addClass('noclick')
					$(this).removeClass('noclick').addClass('onclick')
					obj.find('.inputBox').hide()
					obj.find('.inputBox').eq(index).show()
				})
			})
		}

		loginRegist($('.no-login-ways'))


		$('.user').click(function () {
			$('.has-login-back').toggle(500)
		});

		$('.no-login-ways .register input').focus(function () {
			$('.submit').removeClass('btnInit').addClass('btnActive')
		})
	</script>
{/block}
{block name="body"}
	{include file="public/header" /}
	 <div class="content bookStore" style="margin:15px auto">
        <div class="storeBox">
            <div class="storeLeft classify">
                <div class="aside bookStoreChoose">
                    
                    <ul class="booktypeChoose" style="margin-top: 30px;">
                        <li>
						<p class='title'>小说分类</p>
						<p class='chooseItem beChoose'><a href='/books?channel={$channel}&cate=0&fullflag={$fullflag}&upday={$upday}&size={$size}&keyword={$searchkey}'class="{if condition="($cate == 0)"}avtive{/if}">全部</a>
						 {volist name="category" id="vo"}
						<a href='/books?channel={$channel}&cate={$vo.id}&fullflag={$fullflag}&upday={$upday}&size={$size}&keyword={$searchkey}' class="{eq name="vo.id" value="$cate"}avtive{/eq}">{$vo.title}</a>
						 {/volist}

						</p></li>						
						<li><p class='title'>作品字数</p><p class='chooseItem beChoose'><a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size=&keyword={$searchkey}'class="{if condition="($size=='')"}avtive{/if}">全部</a>
						<a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size=1&keyword={$searchkey}' class="{eq name="size" value="1"}avtive{/eq}">30万以下</a>
						<a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size=2&keyword={$searchkey}' class="{eq name="size" value="2"}avtive{/eq}">30-50万</a>
						<a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size=3&keyword={$searchkey}' class="{eq name="size" value="3"}avtive{/eq}">50-100万</a>
						<a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size=4&keyword={$searchkey}' class="{eq name="size" value="4"}avtive{/eq}">100万以上</a>
						</p></li>
						<li><p class='title'>是否完结</p><p class='chooseItem beChoose'><a href='/books?channel={$channel}&cate={$cate}&fullflag=&upday={$upday}&size={$size}&keyword={$searchkey}'class="{if condition="($fullflag=='')"}avtive{/if}">全部</a><a href='/books?channel={$channel}&cate={$cate}&fullflag=0&upday={$upday}&size={$size}&keyword={$searchkey}' class="{eq name="fullflag" value="0"}avtive{/eq}">连载</a><a href='/books?channel={$channel}&cate={$cate}&fullflag=1&upday={$upday}&size={$size}&keyword={$searchkey}' class="{eq name="fullflag" value="1"}avtive{/eq}">完结</a></p></li>
						
						<li><p class='title'>更新时间</p><p class='chooseItem beChoose'><a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday=&size={$size}&keyword={$searchkey}'class="{if condition="($upday=='')"}avtive{/if}">全部</a>
						<a href="/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday=1&size={$size}&keyword={$searchkey}" class="{eq name="upday" value="1"}avtive{/eq}">三天内</a>
						<a href="/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday=2&size={$size}&keyword={$searchkey}" class="{eq name="upday" value="2"}avtive{/eq}">一周内</a>
						<a href="/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday=3&size={$size}&keyword={$searchkey}" class="{eq name="upday" value="3"}avtive{/eq}">半月内</a>
						<a href="/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday=4&size={$size}&keyword={$searchkey}" class="{eq name="upday" value="4"}avtive{/eq}">一月内</a>
						
						</p></li>
                    </ul>
                </div>
                <div class="aside">
                    <div class="side-title">
                        <p class="">主编推荐</p>
                    </div>
                    <ul id="bird" class="side-bookList">
					{volist name="editortop" id="vo" key="k"}
						{if $k==1}
					<li class=firstLI'>
							<div class='side-book-des'>
								<a class='bookcover' href='{:url('index/books/index',['id'=>$vo.id])}'>
									<img src='{empty name="vo.cover"}/public/novel/images/default.jpg{else /}{$vo.cover}{/empty}' alt=''></a>
								<div class='tit-authr-des'>
									<a href='{:url('index/books/index',['id'=>$vo.id])}' class='title'>{$vo.title}</a>
									<a href='{:url('index/books/index',['id'=>$vo.id])}' class='author'>{$vo.author}</a>
									<p class='des'>{$vo.intro}……</p>
								</div>
							</div>
						</li> 
					{else/}
					<li class=''>
						<span class='circle'></span>
						<a href='{:url('index/books/index',['id'=>$vo.id])}' class='type'>【{$vo.category}】</a>
						<a href='{:url('index/books/index',['id'=>$vo.id])}' class='side-book-name'>{$vo.title}</a>
					</li>
					{/if}
					{/volist}
					</ul>
                </div>
                <div class="aside">
                    <div class="side-title">
                        <p class="">火热短篇</p>
                    </div>
                    <ul id="wind" class="side-bookList">
					
					{volist name="hotnovel" id="vo" key="k"}
						{if $k==1}
					<li class=firstLI'>
							<div class='side-book-des'>
								<a class='bookcover' href='{:url('index/books/index',['id'=>$vo.id])}'>
									<img src='{empty name="vo.cover"}/public/novel/images/default.jpg{else /}{$vo.cover}{/empty}' alt=''></a>
								<div class='tit-authr-des'>
									<a href='{:url('index/books/index',['id'=>$vo.id])}' class='title'>{$vo.title}</a>
									<a href='{:url('index/books/index',['id'=>$vo.id])}' class='author'>{$vo.author}</a>
									<p class='des'>{$vo.intro}……</p>
								</div>
							</div>
						</li> 
					{else/}
					<li class=''>
						<span class='circle'></span>
						<a href='{:url('index/books/index',['id'=>$vo.id])}' class='type'>【{$vo.category}】</a>
						<a href='{:url('index/books/index',['id'=>$vo.id])}' class='side-book-name'>{$vo.title}</a>
					</li>
					{/if}
					{/volist}
					
					</ul>
                </div>
            </div>

            <div class="storeRight">
                <div class="Tab">
                     <a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size={$size}&keyword={$searchkey}&order=' class="{if condition="($order =='')"}activeTab{/if}">全部</a> <a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size={$size}&keyword={$searchkey}&order=size' class="{if condition="($order =='size')"}activeTab{/if}">字数</a> <a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size={$size}&keyword={$searchkey}&order=allvisit' class="{if condition="($order =='allvisit')"}activeTab{/if}">点击</a> <a href='/books?channel={$channel}&cate={$cate}&fullflag={$fullflag}&upday={$upday}&size={$size}&keyword={$searchkey}&order=update_time' class="{if condition="($order =='update_time')"}activeTab{/if}">最新更新</a>
                </div>
                <div class="tabItem">
                    <ul id="novellist" class="commonDescript" style="overflow: hidden;">
					{volist name="list" id="vo"}
                    <li>
					   <a class='bookCover' href='{:url('index/books/index',['id'=>$vo.id])}'><img src='{empty name="vo.cover"}/public/novel/images/default.jpg{else /}{$vo.cover}{/empty}' alt=''></a>
						<div class='desWord'>
							<a class='title' href='{:url('index/books/index',['id'=>$vo.id])}'>{$vo.title}</a>
							<p class='message'>
								<img src='/public/novelv2/img/index/home-icon-author.png' alt=''><a href='{:url('index/books/index',['id'=>$vo.id])}'>{$vo.author}</a>|
								<a href='/books?channel={$channel}&cate={$vo.category_id}&fullflag={$fullflag}&upday={$upday}&size={$size}&keyword={$searchkey}&order='>{$vo.cate}</a>|<a href='/books?channel={$channel}&cate={$vo.category_id}&fullflag={$vo.fullflag}&upday={$upday}&size={$size}&keyword={$searchkey}&order='>{$vo.status}</a>|
								<a>{$vo.size}字</a>
							</p>
							<p class='des'>      {$vo.desc}...</p>
							<a class='new' href='{$vo.link_last}'>最新：{$vo.chapter}</a>
							<p class='date'>{$vo.update_time}更新</p>
						</div></li>
					{/volist}
					</ul>

                    <!-- 分页 -->
                    <div class="paginationWrap" style="text-align: right;">
                        <ul class="pagination" id="page"></ul>
                        <div id="pageJump" class="pageJump">
                            <input type="text" />
                            <span>页</span>
                            <button type="button" class="button">GO</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
	 </div>
	{block name="include"}{include file="public:footer" /}{/block}    
{/block}
{block name="script"}
<script src='/public/novelv2/js/templete/pager.js'></script>
<script>
    textmore('.stackRoomWrap .aside .des', 20)
    textmore('.stackRoomWrap .commonDescript .des', 35)
	var total = {$total|default='1'},
		cate = {$cate|default=''},
		fullflag = {$fullflag|default='""'},
		upday = {$upday|default='""'},
		size = {$size|default='""'},
		keyword = {$keyword|default='""'},
		order = "{$order|default=''}";

    Page({
        num: total,				//页码数
        startnum: 1,				//指定页码
        elem: $('#page'),		//指定的元素
        callback: function (n) {	//回调函数
            RefreshData(n);

        }
    });

    function RefreshData(index){
        $.ajax({
            url: "{:url('books/GetData')}",
            type: "post",
            data: {Action:"NovelList",page:index,cate:cate,fullflag:fullflag,upday:upday,size:size,keyword:keyword,order:order},
            success: function (data) {
                $("#novellist").html(data);
            }
        });
    }
</script>
{/block}